package homework.api05;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class Oos {
    public static void main(String[] args) throws IOException {
        Student s = new Student(20,"小明","男",new String[]{"大一","团支书"});
        FileOutputStream fos = new FileOutputStream("s.student");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(s);
        oos.close();
        fos.close();
    }
}
